package com.cd2cd.mapper;

import java.util.List;

import com.cd2cd.mapper.gen.SuperProFunArgMapper;
import com.cd2cd.domain.ProFunArg;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ProFunArgMapper extends SuperProFunArgMapper {

    List<ProFunArg> fetchFunArgsByFunId(@Param("funId") Long funId);

    List<ProFunArg> fetchFunArgsChildrenById(@Param("id") Long id);

    @Select("select * from pro_fun_arg where fun_id in (select id from pro_fun where cid in (select id from pro_file where file_type = 'controller' and project_id = #{projectId}))")
    @ResultMap("BaseResultMap")
    List<ProFunArg> selectByProjectId(@Param("projectId") Long projectId);
}